package org.study.controller;

import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.study.service.ChatAssistant;

/**
 * @author: jzhou
 * @date: 2025/7/6-15:56
 * @version: 1.0
 * @description: java-ai-study
 */
@RestController
public class DeclarativeAIServiceController {

    @Resource
    private ChatAssistant chatAssistantQwen;

    // 请求接口：http://localhost:8080/lc4j/boot/declarative?message=Hello
    @GetMapping(value = "/lc4j/boot/declarative")
    public String declarative(@RequestParam(value = "prompt", defaultValue = "你是谁") String message)
    {
        return chatAssistantQwen.chat(message);
    }
}
